import { handle } from '../../index'

const suffix = 'api'

// 查询字典项
export const dictGetAllSysDictsByValue = (params) => handle({
  url: `/${suffix}/api/dict/getAllSysDictsByValue`,
  method: 'get',
  params
})
// 查询所有字典项
export const dictList = () => handle({
  url: `/${suffix}/api/dict`,
  method: 'get',
})
// 创建字典项
export const dictAdd = (params: any) => handle({
  url: `/${suffix}/api/dict`,
  method: 'post',
  params
})
// 删除字典项
export const dictDel = (id: any) => handle({
  url: `/${suffix}/api/dict/${id}`,
  method: 'delete',
})
// 删除字典项
export const dictInfo = (id: any) => handle({
  url: `/${suffix}/api/dict/${id}`,
  method: 'get',
})
// 更新字典项
export const dictEdit = (params: any) => handle({
  url: `/${suffix}/api/dict`,
  method: 'put',
  params
})
